package com.sitech.ibnms.c3p.domain;

import java.util.Date;
import java.util.UUID;

/**
 * Created by liujhc on 9/29.
 */
public class NoticeMessage {
    private String messageId;
    private String serialNo;
    private String messageType;
    private String messageContent;
    private Date sendTime;
    private String messageTo;
    private String unitId;
    private String kpiId;

    public NoticeMessage() {
    }

    public NoticeMessage(String messageTo, String serialNo, String messageContent) {
        this.messageId = UUID.randomUUID().toString().toUpperCase();
        this.messageTo = messageTo;
        this.serialNo = serialNo;
        this.messageType = "13";
        this.messageContent = messageContent;
        this.sendTime = new Date();
    }

    public NoticeMessage(TbSubscribeMessage message) {
        this.messageId = message.getMESSAGE_ID();
        this.messageTo = message.getMESSAGE_TO();
        this.serialNo = message.getSERIAL_NO();
        this.messageType = message.getMESSAGE_TYPE();
        this.messageContent = message.getMESSAGE_CONTENT();
        this.sendTime = message.getSEND_TIME();
    }

    @Override
    public String toString() {
        return "NoticeMessage{" +
                "messageId='" + messageId + '\'' +
                ", serialNo='" + serialNo + '\'' +
                ", messageType='" + messageType + '\'' +
                ", messageContent='" + messageContent + '\'' +
                ", sendTime=" + sendTime +
                ", messageTo='" + messageTo + '\'' +
                ", unitId='" + unitId + '\'' +
                ", kpiId='" + kpiId + '\'' +
                '}';
    }

    public String getMessageId() {
        return messageId;
    }

    public void setMessageId(String messageId) {
        this.messageId = messageId;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public String getMessageType() {
        return messageType;
    }

    public void setMessageType(String messageType) {
        this.messageType = messageType;
    }

    public String getMessageContent() {
        return messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public Date getSendTime() {
        return sendTime;
    }

    public void setSendTime(Date sendTime) {
        this.sendTime = sendTime;
    }

    public String getMessageTo() {
        return messageTo;
    }

    public void setMessageTo(String messageTo) {
        this.messageTo = messageTo;
    }

    public String getUnitId() {
        return unitId;
    }

    public void setUnitId(String unitId) {
        this.unitId = unitId;
    }

    public String getKpiId() {
        return kpiId;
    }

    public void setKpiId(String kpiId) {
        this.kpiId = kpiId;
    }
}
